package com.sinoglobal.ningxia.activity.mymessage;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import com.sinoglobal.ningxia.R;
import com.sinoglobal.ningxia.activity.base.BaseActivity;

/**
 * 
 * @author yrq
 * @createdate 2014-7-24 下午16:58:59
 * @Description:我的消息 消息详情
 */
public class MessageContentActivity extends BaseActivity {

	private TextView messageName; // 消息名字
	private TextView messageTime; // 消息时间
	private TextView messageContent; // 消息内容
	private String msgName; // 消息名字
	private String msgTime; // 消息时间
	private String msgContent; // 消息内容

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		//Auto-generated method stub
		super.onCreate(savedInstanceState);
		titleView.setText(getString(R.string.myMessage));
		setContentView(R.layout.activity_message_content);
		openChenJInShi();//开启沉浸式
		init();
		setMessageContent();
	}

	private void init() {
		messageName = (TextView) findViewById(R.id.message_name);
		messageTime = (TextView) findViewById(R.id.message_time);
		messageContent = (TextView) findViewById(R.id.message_content);
	}

	private void setMessageContent() {
		Intent intent = getIntent();
		msgName = intent.getStringExtra("msgName");
		msgTime = intent.getStringExtra("msgTime");
		msgContent = intent.getStringExtra("msgContent");
		if (msgName != null) {
			messageName.setText(msgName);
		}
		if (msgTime != null) {
			messageTime.setText(msgTime);
		}
		if (msgContent != null) {
			messageContent.setText(msgContent);
		}
	}
}
